package com.jy.rhin.application.infra.assembler;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jy.rhin.facade.infra.controller.dto.CDADocumentTemplateDto;
import com.jy.rhin.infra.repo.document.template.po.CDADocumentTemplatePo;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;

import java.util.List;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface CDADocumentTemplateAssembler {

    CDADocumentTemplateDto toCDADocumentTemplateDto(CDADocumentTemplatePo cdaDocumentTemplatePo);

    CDADocumentTemplatePo fromCDADocumentTemplateDto(CDADocumentTemplateDto cdaDocumentTemplateDto);

    List<CDADocumentTemplateDto> toCDADocumentTemplateDtoList(List<CDADocumentTemplatePo> cdaDocumentTemplatePoList);

    List<CDADocumentTemplatePo> fromCDADocumentTemplateDtoList(List<CDADocumentTemplateDto> cdaDocumentTemplateDtoList);

    Page<CDADocumentTemplateDto> toCDADocumentTemplateDtoPage(Page<CDADocumentTemplatePo> cdaDocumentTemplatePoPage);

}
